package com.salton123.feature

import android.os.Looper
import android.os.MessageQueue

/**
 * User: newSalton@outlook.com
 * Date: 2020/1/10 10:04
 * ModifyTime: 10:04
 * Description:
 */
abstract class IdleHandlerFeature : IFeature, MessageQueue.IdleHandler {

    override fun onBind() {
        Looper.myQueue().addIdleHandler(this)
    }

    override fun onUnBind() {
        Looper.myQueue().removeIdleHandler(this)
    }
}
